package com.share.io.filechange;

import java.io.File;

import org.apache.commons.io.monitor.FileAlterationListener;
import org.apache.commons.io.monitor.FileAlterationObserver;

/**
 * 文件变化监控接口
 * @author 史贤伟
 *
 */
public class FileChangeListener implements FileAlterationListener{

	FileChangeMonitor monitor = null;
	@Override
	public void onDirectoryChange(File directory) {
		System.out.println("onDirectoryChange");
	}

	@Override
	public void onDirectoryCreate(File directory) {
		System.out.println("onDirectoryCreate");
	}

	@Override
	public void onDirectoryDelete(File directory) {
		System.out.println("onDirectoryDelete");
	}

	@Override
	public void onFileChange(File file) {
		System.out.println("onFileChange");
	}

	@Override
	public void onFileCreate(File file) {
		System.out.println("onFileCreate");
	}

	@Override
	public void onFileDelete(File file) {
		System.out.println("onFileDelete");
	}

	@Override
	public void onStart(FileAlterationObserver observer) {
		
	}

	@Override
	public void onStop(FileAlterationObserver observer) {
		
	}

}
